# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer:
pkgname=flameshot
pkgver=0.6.0
pkgrel=1
pkgdesc="Featureful screenshot app"
options="!check" # No test suite
url="https://github.com/lupoDharkael/flameshot"
arch="all"
license="GPL-3.0-or-later"
depends="qt5-qtsvg"
makedepends="make qt5-qtsvg-dev qt5-qttools-dev"
subpackages="$pkgname-lang $pkgname-bash-completion"
source="$pkgname-$pkgver.tar.gz::https://github.com/lupoDharkael/flameshot/archive/v$pkgver.tar.gz
	arrow-add-missing-qpainterpath-header.patch
	color-wheel-add-missing-qpainterpath-header.patch
	"
langdir="/usr/share/flameshot/translations"

prepare() {
	default_prepare
	sed -i "s|TAG_VERSION = .*|TAG_VERSION = v${pkgver}|" flameshot.pro
}

build() {
	qmake-qt5 CONFIG+=packaging PREFIX=/usr DATADIR=/usr/share
	make
}

package() {
	make INSTALL_ROOT="$pkgdir" install
}
sha512sums="194127032ab0f62a6ba2698688e11b2d4e6f0e04a282144f5fbb6c232eeebc71371af2d55abbb6e98b8649dee036e6f0a6ef55710e4321a60fd5ac6e453ab975  flameshot-0.6.0.tar.gz
cd6b1264478ac5085a56615b0aaa2c33cbd3237c2b032b11d8c4b44d038ae665c4b6e807a8e7914b72cff285518acb6a6738bf43561fdd2ca96e9202e4fed78c  arrow-add-missing-qpainterpath-header.patch
0a8ee5d50548d70d4bd35add29e6bf667d03ba934a679f13960f88f9eed962244089f5ef1dfe5cacdb7b5437aa205486600f84beadb9c1a6006e2b339ab684e2  color-wheel-add-missing-qpainterpath-header.patch"
